<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GTimeZone</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GLib Reference Manual">
<link rel="up" href="glib-utilities.html" title="GLib Utilities">
<link rel="prev" href="glib-Date-and-Time-Functions.html" title="Date and Time Functions">
<link rel="next" href="glib-GDateTime.html" title="GDateTime">
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="glib-Date-and-Time-Functions.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="glib-utilities.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GLib Reference Manual</th>
<td><a accesskey="n" href="glib-GDateTime.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#glib-GTimeZone.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#glib-GTimeZone.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="glib-GTimeZone"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="glib-GTimeZone.top_of_page"></a>GTimeZone</span></h2>
<p>GTimeZone — A structure representing a time zone</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="glib-GTimeZone.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;glib.h&gt;

                    <a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone">GTimeZone</a>;
<span class="returnvalue">void</span>                <a class="link" href="glib-GTimeZone.html#g-time-zone-unref" title="g_time_zone_unref ()">g_time_zone_unref</a>                   (<em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> *tz</code></em>);
<a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="returnvalue">GTimeZone</span></a> *              <a class="link" href="glib-GTimeZone.html#g-time-zone-ref" title="g_time_zone_ref ()">g_time_zone_ref</a>                (<em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> *tz</code></em>);

<a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="returnvalue">GTimeZone</span></a> *              <a class="link" href="glib-GTimeZone.html#g-time-zone-new" title="g_time_zone_new ()">g_time_zone_new</a>                (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *identifier</code></em>);
<a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="returnvalue">GTimeZone</span></a> *              <a class="link" href="glib-GTimeZone.html#g-time-zone-new-local" title="g_time_zone_new_local ()">g_time_zone_new_local</a>          (<em class="parameter"><code><span class="type">void</span></code></em>);
<a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="returnvalue">GTimeZone</span></a> *              <a class="link" href="glib-GTimeZone.html#g-time-zone-new-utc" title="g_time_zone_new_utc ()">g_time_zone_new_utc</a>            (<em class="parameter"><code><span class="type">void</span></code></em>);

enum                <a class="link" href="glib-GTimeZone.html#GTimeType" title="enum GTimeType">GTimeType</a>;
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                <a class="link" href="glib-GTimeZone.html#g-time-zone-find-interval" title="g_time_zone_find_interval ()">g_time_zone_find_interval</a>           (<em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> *tz</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeType" title="enum GTimeType"><span class="type">GTimeType</span></a> type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint64" title="gint64"><span class="type">gint64</span></a> time</code></em>);
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                <a class="link" href="glib-GTimeZone.html#g-time-zone-adjust-time" title="g_time_zone_adjust_time ()">g_time_zone_adjust_time</a>             (<em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> *tz</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeType" title="enum GTimeType"><span class="type">GTimeType</span></a> type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint64" title="gint64"><span class="type">gint64</span></a> *time</code></em>);

const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *            <a class="link" href="glib-GTimeZone.html#g-time-zone-get-abbreviation" title="g_time_zone_get_abbreviation ()">g_time_zone_get_abbreviation</a>   (<em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> *tz</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> interval</code></em>);
<a class="link" href="glib-Basic-Types.html#gint32" title="gint32"><span class="returnvalue">gint32</span></a>              <a class="link" href="glib-GTimeZone.html#g-time-zone-get-offset" title="g_time_zone_get_offset ()">g_time_zone_get_offset</a>              (<em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> *tz</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> interval</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-GTimeZone.html#g-time-zone-is-dst" title="g_time_zone_is_dst ()">g_time_zone_is_dst</a>                  (<em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> *tz</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> interval</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="glib-GTimeZone.description"></a><h2>Description</h2>
<p>
<a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> is a structure that represents a time zone, at no
particular point in time.  It is refcounted and immutable.
</p>
<p>
A time zone contains a number of intervals.  Each interval has
an abbreviation to describe it, an offet to UTC and a flag indicating
if the daylight savings time is in effect during that interval.  A
time zone always has at least one interval -- interval 0.
</p>
<p>
Every UTC time is contained within exactly one interval, but a given
local time may be contained within zero, one or two intervals (due to
incontinuities associated with daylight savings time).
</p>
<p>
An interval may refer to a specific period of time (eg: the duration
of daylight savings time during 2010) or it may refer to many periods
of time that share the same properties (eg: all periods of daylight
savings time).  It is also possible (usually for political reasons)
that some properties (like the abbreviation) change between intervals
without other properties changing.
</p>
<p>
<a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> is available since GLib 2.26.
</p>
</div>
<div class="refsect1">
<a name="glib-GTimeZone.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GTimeZone"></a><h3>GTimeZone</h3>
<pre class="programlisting">typedef struct _GTimeZone GTimeZone;</pre>
<p>
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a> is an opaque structure whose members cannot be accessed
directly.
</p>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-time-zone-unref"></a><h3>g_time_zone_unref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_time_zone_unref                   (<em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> *tz</code></em>);</pre>
<p>
Decreases the reference count on <em class="parameter"><code>tz</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>tz</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-time-zone-ref"></a><h3>g_time_zone_ref ()</h3>
<pre class="programlisting"><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="returnvalue">GTimeZone</span></a> *              g_time_zone_ref                (<em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> *tz</code></em>);</pre>
<p>
Increases the reference count on <em class="parameter"><code>tz</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>tz</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new reference to <em class="parameter"><code>tz</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-time-zone-new"></a><h3>g_time_zone_new ()</h3>
<pre class="programlisting"><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="returnvalue">GTimeZone</span></a> *              g_time_zone_new                (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *identifier</code></em>);</pre>
<p>
Creates a <a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> corresponding to <em class="parameter"><code>identifier</code></em>.
</p>
<p>
<em class="parameter"><code>identifier</code></em> can either be an RFC3339/ISO 8601 time offset or
something that would pass as a valid value for the
<code class="varname">TZ</code> environment variable (including <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>).
</p>
<p>
Valid RFC3339 time offsets are <code class="literal">"Z"</code> (for UTC) or
<code class="literal">"±hh:mm"</code>.  ISO 8601 additionally specifies
<code class="literal">"±hhmm"</code> and <code class="literal">"±hh"</code>.
</p>
<p>
The <code class="varname">TZ</code> environment variable typically corresponds
to the name of a file in the zoneinfo database, but there are many
other possibilities.  Note that those other possibilities are not
currently implemented, but are planned.
</p>
<p>
<a class="link" href="glib-GTimeZone.html#g-time-zone-new-local" title="g_time_zone_new_local ()"><code class="function">g_time_zone_new_local()</code></a> calls this function with the value of the
<code class="varname">TZ</code> environment variable.  This function itself is
independent of the value of <code class="varname">TZ</code>, but if <em class="parameter"><code>identifier</code></em>
is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> then <code class="filename">/etc/localtime</code> will be consulted
to discover the correct timezone.
</p>
<p>
See <a class="ulink" href="http://tools.ietf.org/html/rfc3339#section-5.6" target="_top">RFC3339
§5.6</a> for a precise definition of valid RFC3339 time offsets
(the <code class="varname">time-offset</code> expansion) and ISO 8601 for the
full list of valid time offsets.  See <a class="ulink" href="http://www.gnu.org/s/libc/manual/html_node/TZ-Variable.html" target="_top">The
GNU C Library manual</a> for an explanation of the possible
values of the <code class="varname">TZ</code> environment variable.
</p>
<p>
You should release the return value by calling <a class="link" href="glib-GTimeZone.html#g-time-zone-unref" title="g_time_zone_unref ()"><code class="function">g_time_zone_unref()</code></a>
when you are done with it.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>identifier</code></em> :</span></p></td>
<td>a timezone identifier. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the requested timezone</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-time-zone-new-local"></a><h3>g_time_zone_new_local ()</h3>
<pre class="programlisting"><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="returnvalue">GTimeZone</span></a> *              g_time_zone_new_local          (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Creates a <a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> corresponding to local time.
</p>
<p>
This is equivalent to calling <a class="link" href="glib-GTimeZone.html#g-time-zone-new" title="g_time_zone_new ()"><code class="function">g_time_zone_new()</code></a> with the value of the
<code class="varname">TZ</code> environment variable (including the possibility
of <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>).  Changes made to <code class="varname">TZ</code> after the first
call to this function may or may not be noticed by future calls.
</p>
<p>
You should release the return value by calling <a class="link" href="glib-GTimeZone.html#g-time-zone-unref" title="g_time_zone_unref ()"><code class="function">g_time_zone_unref()</code></a>
when you are done with it.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the local timezone</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-time-zone-new-utc"></a><h3>g_time_zone_new_utc ()</h3>
<pre class="programlisting"><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="returnvalue">GTimeZone</span></a> *              g_time_zone_new_utc            (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Creates a <a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> corresponding to UTC.
</p>
<p>
This is equivalent to calling <a class="link" href="glib-GTimeZone.html#g-time-zone-new" title="g_time_zone_new ()"><code class="function">g_time_zone_new()</code></a> with a value like
"Z", "UTC", "+00", etc.
</p>
<p>
You should release the return value by calling <a class="link" href="glib-GTimeZone.html#g-time-zone-unref" title="g_time_zone_unref ()"><code class="function">g_time_zone_unref()</code></a>
when you are done with it.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the universal timezone</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="GTimeType"></a><h3>enum GTimeType</h3>
<pre class="programlisting">typedef enum
{
  G_TIME_TYPE_STANDARD,
  G_TIME_TYPE_DAYLIGHT,
  G_TIME_TYPE_UNIVERSAL
} GTimeType;
</pre>
<p>
Disambiguates a given time in two ways.
</p>
<p>
First, specifies if the given time is in universal or local time.
</p>
<p>
Second, if the time is in local time, specifies if it is local
standard time or local daylight time.  This is important for the case
where the same local time occurs twice (during daylight savings time
transitions, for example).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="G-TIME-TYPE-STANDARD:CAPS"></a><span class="term"><code class="literal">G_TIME_TYPE_STANDARD</code></span></p></td>
<td>the time is in local standard time
</td>
</tr>
<tr>
<td><p><a name="G-TIME-TYPE-DAYLIGHT:CAPS"></a><span class="term"><code class="literal">G_TIME_TYPE_DAYLIGHT</code></span></p></td>
<td>the time is in local daylight time
</td>
</tr>
<tr>
<td><p><a name="G-TIME-TYPE-UNIVERSAL:CAPS"></a><span class="term"><code class="literal">G_TIME_TYPE_UNIVERSAL</code></span></p></td>
<td>the time is in UTC
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-time-zone-find-interval"></a><h3>g_time_zone_find_interval ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                g_time_zone_find_interval           (<em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> *tz</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeType" title="enum GTimeType"><span class="type">GTimeType</span></a> type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint64" title="gint64"><span class="type">gint64</span></a> time</code></em>);</pre>
<p>
Finds an the interval within <em class="parameter"><code>tz</code></em> that corresponds to the given <em class="parameter"><code>time</code></em>.
The meaning of <em class="parameter"><code>time</code></em> depends on <em class="parameter"><code>type</code></em>.
</p>
<p>
If <em class="parameter"><code>type</code></em> is <a class="link" href="glib-GTimeZone.html#G-TIME-TYPE-UNIVERSAL:CAPS"><code class="literal">G_TIME_TYPE_UNIVERSAL</code></a> then this function will always
succeed (since universal time is monotonic and continuous).
</p>
<p>
Otherwise <em class="parameter"><code>time</code></em> is treated is local time.  The distinction between
<a class="link" href="glib-GTimeZone.html#G-TIME-TYPE-STANDARD:CAPS"><code class="literal">G_TIME_TYPE_STANDARD</code></a> and <a class="link" href="glib-GTimeZone.html#G-TIME-TYPE-DAYLIGHT:CAPS"><code class="literal">G_TIME_TYPE_DAYLIGHT</code></a> is ignored except in
the case that the given <em class="parameter"><code>time</code></em> is ambiguous.  In Toronto, for example,
01:30 on November 7th 2010 occured twice (once inside of daylight
savings time and the next, an hour later, outside of daylight savings
time).  In this case, the different value of <em class="parameter"><code>type</code></em> would result in a
different interval being returned.
</p>
<p>
It is still possible for this function to fail.  In Toronto, for
example, 02:00 on March 14th 2010 does not exist (due to the leap
forward to begin daylight savings time).  -1 is returned in that
case.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>tz</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>the <a class="link" href="glib-GTimeZone.html#GTimeType" title="enum GTimeType"><span class="type">GTimeType</span></a> of <em class="parameter"><code>time</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>time</code></em> :</span></p></td>
<td>a number of seconds since January 1, 1970</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the interval containing <em class="parameter"><code>time</code></em>, or -1 in case of failure</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-time-zone-adjust-time"></a><h3>g_time_zone_adjust_time ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                g_time_zone_adjust_time             (<em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> *tz</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeType" title="enum GTimeType"><span class="type">GTimeType</span></a> type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint64" title="gint64"><span class="type">gint64</span></a> *time</code></em>);</pre>
<p>
Finds an interval within <em class="parameter"><code>tz</code></em> that corresponds to the given <em class="parameter"><code>time</code></em>,
possibly adjusting <em class="parameter"><code>time</code></em> if required to fit into an interval.
The meaning of <em class="parameter"><code>time</code></em> depends on <em class="parameter"><code>type</code></em>.
</p>
<p>
This function is similar to <a class="link" href="glib-GTimeZone.html#g-time-zone-find-interval" title="g_time_zone_find_interval ()"><code class="function">g_time_zone_find_interval()</code></a>, with the
difference that it always succeeds (by making the adjustments
described below).
</p>
<p>
In any of the cases where <a class="link" href="glib-GTimeZone.html#g-time-zone-find-interval" title="g_time_zone_find_interval ()"><code class="function">g_time_zone_find_interval()</code></a> succeeds then
this function returns the same value, without modifying <em class="parameter"><code>time</code></em>.
</p>
<p>
This function may, however, modify <em class="parameter"><code>time</code></em> in order to deal with
non-existent times.  If the non-existent local <em class="parameter"><code>time</code></em> of 02:30 were
requested on March 13th 2010 in Toronto then this function would
adjust <em class="parameter"><code>time</code></em> to be 03:00 and return the interval containing the
adjusted time.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>tz</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>the <a class="link" href="glib-GTimeZone.html#GTimeType" title="enum GTimeType"><span class="type">GTimeType</span></a> of <em class="parameter"><code>time</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>time</code></em> :</span></p></td>
<td>a pointer to a number of seconds since January 1, 1970</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the interval containing <em class="parameter"><code>time</code></em>, never -1</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-time-zone-get-abbreviation"></a><h3>g_time_zone_get_abbreviation ()</h3>
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *            g_time_zone_get_abbreviation   (<em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> *tz</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> interval</code></em>);</pre>
<p>
Determines the time zone abbreviation to be used during a particular
<em class="parameter"><code>interval</code></em> of time in the time zone <em class="parameter"><code>tz</code></em>.
</p>
<p>
For example, in Toronto this is currently "EST" during the winter
months and "EDT" during the summer months when daylight savings time
is in effect.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>tz</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td>
<td>an interval within the timezone</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the time zone abbreviation, which belongs to <em class="parameter"><code>tz</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-time-zone-get-offset"></a><h3>g_time_zone_get_offset ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint32" title="gint32"><span class="returnvalue">gint32</span></a>              g_time_zone_get_offset              (<em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> *tz</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> interval</code></em>);</pre>
<p>
Determines the offset to UTC in effect during a particular <em class="parameter"><code>interval</code></em>
of time in the time zone <em class="parameter"><code>tz</code></em>.
</p>
<p>
The offset is the number of seconds that you add to UTC time to
arrive at local time for <em class="parameter"><code>tz</code></em> (ie: negative numbers for time zones
west of GMT, positive numbers for east).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>tz</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td>
<td>an interval within the timezone</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the number of seconds that should be added to UTC to get the
local time in <em class="parameter"><code>tz</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-time-zone-is-dst"></a><h3>g_time_zone_is_dst ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_time_zone_is_dst                  (<em class="parameter"><code><a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a> *tz</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> interval</code></em>);</pre>
<p>
Determines if daylight savings time is in effect during a particular
<em class="parameter"><code>interval</code></em> of time in the time zone <em class="parameter"><code>tz</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>tz</code></em> :</span></p></td>
<td>a <a class="link" href="glib-GTimeZone.html#GTimeZone" title="GTimeZone"><span class="type">GTimeZone</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td>
<td>an interval within the timezone</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if daylight savings time is in effect</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
</div>
<div class="refsect1">
<a name="glib-GTimeZone.see-also"></a><h2>See Also</h2>
<a class="link" href="glib-GDateTime.html#GDateTime" title="GDateTime"><span class="type">GDateTime</span></a>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.17</div>
</body>
</html>